package com.acc.mobileappr.entities;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;

/**
 * Created by IntelliJ IDEA.
 * User: user
 * Date: Apr 20, 2011
 * Time: 10:54:55 AM
 * To change this template use File | Settings | File Templates.
 */
public class TrnMApprRequestEntityPK implements Serializable {
    private String reqNo;

    @Id
    @Column(name = "REQ_NO")
    public String getReqNo() {
        return reqNo;
    }

    public void setReqNo(String reqNo) {
        this.reqNo = reqNo;
    }

    private String pin;

    @Id
    @Column(name = "PIN")
    public String getPin() {
        return pin;
    }

    public void setPin(String pin) {
        this.pin = pin;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TrnMApprRequestEntityPK that = (TrnMApprRequestEntityPK) o;

        if (pin != null ? !pin.equals(that.pin) : that.pin != null) return false;
        if (reqNo != null ? !reqNo.equals(that.reqNo) : that.reqNo != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = reqNo != null ? reqNo.hashCode() : 0;
        result = 31 * result + (pin != null ? pin.hashCode() : 0);
        return result;
    }
}
